package com.ming.luckyDemo.service.serviceImpl;

import com.ming.luckyDemo.mapper.HistoryLuckyMapper;
import com.ming.luckyDemo.pojo.DO.HistoryLuckyDO;
import com.ming.luckyDemo.service.HistoryLuckyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Tcm
 */
@Service
public class HistoryLuckyServiceImpl implements HistoryLuckyService {

    @Autowired
    private HistoryLuckyMapper historyLuckyMapper;

    @Override
    public List<HistoryLuckyDO> selectLucky(int numbers) {
        if (numbers==0){
          return  historyLuckyMapper.selectLucky();
        }
       return historyLuckyMapper.selectLucky(numbers);
    }

    @Override
    public List<HistoryLuckyDO> selectHistory() {
        return historyLuckyMapper.selectLucky();
    }
}
